import Vue from 'vue'
import App from './App.vue'
import i18n from './i18n'
import router from './router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
import './assets/styles/reset.scss'
import './assets/styles/global.scss'
import './assets/styles/common.scss'
import httpPlugin from "@/axios/index";
import qs from 'qs'
import store from './store'
import serveDialog from './components/serveDialog.vue';
import payDialog from './components/payDialog.vue';
import TreeSelect from "@/components/tree-select.vue";
/* 引入公共函数 */
import common from './assets/js/common'
Vue.use(common);

Vue.config.productionTip = false

Vue.use(ElementUI);
Vue.use(httpPlugin);
Vue.prototype.$qs = qs;

// 定义全局组件
Vue.component('serveDialog', serveDialog);
Vue.component('payDialog', payDialog);
Vue.component('TreeSelect', TreeSelect);

router.beforeEach((to, from, next) => {
  // 在这里进行权限检查或其他操作
  next();
});

new Vue({
  i18n,
  router,
  store,
  render: h => h(App),
}).$mount('#app')
